﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace WpfApplication1.Models
{
    public class Aircraft
    {
        [PlotFieldSettings(false)]
        public int engine = 0;
        [PlotFieldSettings(false)]
        public int desired_engine = 0;

        public double aileron = 0;
        public double desired_aileron = 0;

        [PlotFieldSettings(false)]
        public double elevator = 0;
        [PlotFieldSettings(false)]
        public double desired_elevator = 0;

        [PlotFieldSettings(false)]
        public int altitude = 0;
        [PlotFieldSettings(false)]
        public int desired_altitude = 0;

        public int speed = 0;
        public int desired_speed = 0;

        [PlotFieldSettings(false)]
        public int rateOfClimb = 0;
        [PlotFieldSettings(false)]
        public int desired_rateOfClimb = 0;

        public double heading = 0;
        public double desired_heading = 0;
        [PlotFieldSettings(false)]
        public double headingOld = 0;

        [PlotFieldSettings(false)]
        public double pitchAngle = 0;
        [PlotFieldSettings(false)]
        public double desired_pitchAngle = 0;

        public double bankAngle = 0;
        public double desired_bankAngle = 0;

        [PlotFieldSettings(false)]
        public int outsideAirTemp = 0;
        [PlotFieldSettings(false)]
        public int desired_outsideAirTemp = 0;

        public double groundspeed = 0;
        public double desired_groundspeed = 0;

        public double rollRate = 0;
        public double desired_rollRate = 0;

        public double pitchRate = 0;
        public double desired_pitchRate = 0;

        public double yawRate = 0;
        public double desired_yawRate = 0;

        public double xAcceleration = 0;
        public double desired_xAcceleration = 0;

        public double yAcceleration = 0;
        public double desired_yAcceleration = 0;

        public double zAcceleration = 0;
        public double desired_zAcceleration = 0;

        public double sideSlip = 0;
        public double desired_sideSlip = 0;

        public double track = 0;
        public double desired_track = 0;

        public double turnRate = 0;
        public double desired_turnRate = 0;

        public double longitude = 0;
        public double desired_longitude = 0;

        public double latitude = 0;
        public double desired_latitude = 0;

        //time need for the modulation
        public double modulationTime = 0;
        public double desired_modulationTime = 0;

        public Aircraft()
        {

        }

        public double Desired_rollRate
        {
            get
            {
                return desired_rollRate;
            }
            set
            {
                desired_rollRate = value;
            }
        }

        public double Desired_pitchRate
        {
            get
            {
                return desired_pitchRate;
            }
            set
            {
                desired_pitchRate = value;
            }
        }

        public double Desired_bankAngle
        {
            get
            {
                return desired_bankAngle;
            }
            set
            {
                desired_bankAngle = value;
            }
        }

        public double Desired_turnRate
        {
            get
            {
                return desired_turnRate;
            }
            set
            {
                desired_turnRate = value;
            }
        }

        public double Desired_track
        {
            get
            {
                return desired_track;
            }
            set
            {
                desired_track = value;
            }
        }

        public void writeAllParametersToConsole()
        {
            Console.WriteLine("aileron:" + aileron);
            Console.WriteLine("elevator:" + elevator);
            Console.WriteLine("engine:" + engine);
            Console.WriteLine("altitude:" + altitude);
            Console.WriteLine("speed:" + speed);
            Console.WriteLine("rateOfClimb:" + rateOfClimb);
            Console.WriteLine("heading:" + heading);
            Console.WriteLine("pitchAngle:" + pitchAngle);
            Console.WriteLine("bankAngle:" + bankAngle);
            Console.WriteLine("outsideAirTemp:" + outsideAirTemp);
            Console.WriteLine("groundspeed:" + groundspeed);
            Console.WriteLine("rollRate:" + rollRate);
            Console.WriteLine("pitchRate:" + pitchRate);
            Console.WriteLine("yawRate:" + yawRate);
            Console.WriteLine("xAcceleration:" + xAcceleration);
            Console.WriteLine("yAcceleration:" + yAcceleration);
            Console.WriteLine("zAcceleration:" + zAcceleration);
        }
    }
}
